package com.cloudfun.campusshare.service;

import com.cloudfun.campusshare.common.model.vo.AuthoritySimpleListVO;
import com.cloudfun.campusshare.entity.AuthorityEntity;

import java.util.Collection;
import java.util.List;

/**
 * Created by Huqin on 2020/5/13
 */
public interface AuthorityService {

    public static final String ROOT_ID = "-1";

    /**
     * 获取权限简单列表
     *
     * @return
     */
    List<AuthoritySimpleListVO> getSimpleList();

    /**
     * 获取角色权限
     *
     * @param roleId
     * @return
     */
    List<AuthorityEntity> getAuthorities(String roleId);

    /**
     * 获取角色权限
     *
     * @param roleIds
     * @return
     */
    List<AuthorityEntity> getAuthorities(Collection<String> roleIds);

    /**
     * 获取用户权限
     *
     * @param userId
     * @return
     */
    List<AuthorityEntity> getUserAuthorities(String userId);
}
